home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / appletalk / netatalk / afs / afskrbsrc.sit.hqx / AFS Kerberos 1.0B0 / bsd / net_stuff.h < prev   
Encoding:
C/C++ Source or Header  |  1990-03-02  |  1.1 KB  |  35 lines

  1. /*
  2.  *
  3.  * net_stuff.h: Interface definition to network stuff.
  4.  *
  5.  */
  6.  
  7. #include "mactcpcommontypes.h"
  8. #include "tcppb.h"
  9. #include "udppb.h"
  10.  
  11. typedef StreamPtr stream;
  12. typedef StreamPtr handle_t;
  13. #define notify_proc_t UDPNotifyProc
  14. typedef Ptr user_data_ptr_t;
  15. typedef struct ICMPReport icmp_msg_t;
  16.  
  17. #define STREAM_SIZE 4096
  18.  
  19. int tcp_open_stream(ip_addr dest_ip, ip_port dest_port, stream *sp);
  20. int tcp_close_stream(stream s);
  21. int tcp_send_data(stream s, char *addr, int len);
  22. int tcp_get_data(stream s, char *addr, int max_len, int *real_lenp);
  23. int udp_register (ip_port *local_port, user_data_ptr_t user_data_ptr, char *buffer,
  24.           int len,  handle_t *handle, notify_proc_t notify_proc);
  25. void udp_release (handle_t handle);
  26. void notify_proc (handle_t handle, user_data_ptr_t user_data_ptr);
  27. int udp_send_dgram (handle_t handle, ip_addr dest_ip, ip_port dest_port, 
  28.         char *addr, int len);
  29. int udp_get_dgram (handle_t handle, ip_addr *dest_ip, ip_port *dest_port,
  30.            char *addr, int max_len, int *real_lenp);
  31. int resolve_name(const char *in_name, char *cname, ip_addr *in_addrp);
  32.  
  33. void get_my_ip_addr(ip_addr *my_address);
  34. void get_my_subnet_mask(long *my_subnet_mask);
  35.